package puppy.webData;

/**
 * 
 * @author Sergio Duarte
 * 
 */
public class UserFormData {

	private int  appropriate = 0;
	private int relevant = 0;
	private short gender = 0;
	private String userID = null;
	private int age=0;
	
	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	private Long duration =null;
	private  java.sql.Timestamp  sqlDate=null ;
	
	
	public Long getDuration() {
		return duration;
	}

	public void setDuration(Long duration) {
		this.duration = duration;
	}

	public java.sql.Timestamp getSqlDate() {
		return sqlDate;
	}

	public void setSqlDate(java.sql.Timestamp sqlDate) {
		this.sqlDate = sqlDate;
	}

	private String url = null;

	public String geturl() {
		return url;
	}

	public void seturl(String url) {
		this.url = url;
	}


	public short getGender() {
		return gender;
	}

	private Integer id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public int getAppropriate() {
		return appropriate;
	}

	public void setAppropriate(int appropriate) {
		this.appropriate = appropriate;
	}

	public int getRelevancy() {
		return relevant;
	}

	public void setRelevancy(int  relevant) {
		this.relevant = relevant;
	}



	public void setGender(short gender) {
		this.gender = gender;
	}

	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	
	
	
	public String toString() {

		String s = "";

		
			s+= "Relevant:" + getRelevancy() + "\n";
			s+= "Appropriate:" + getAppropriate() + "\n";
			s+= "UserId:" + getUserID() + "\n";
			s+= "Relevant:" + getRelevancy() + "\n";
		
		return s;

	}
	/**
	 * The user ID is unique for each User. So this should compare User by ID
	 * only.
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object other) {
		return (other instanceof UserFormData) && (id != null)
				&& id.equals(((UserFormData) other).id);
	}

	/**
	 * The user ID is unique for each User. So User with same ID should return
	 * same hashcode.
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return (id != null) ? (this.getClass().hashCode() + id.hashCode())
				: super.hashCode();
	}

}